using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using SBW;

namespace Athena.SBW
{
    public class AutoLayout
    {
        public AutoLayout() { }

        ///<summary>
        ///Toggles the visibility of the Form
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static void toggleVisibility()
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                oService.getMethod("void toggleVisibility()").call(oArguments);
                return;
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///hides/shows the form
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static void setVisible(bool var0)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                oService.getMethod("void setVisible(boolean)").call(oArguments);
                return;
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Returns the model as it is currently Loaded.
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static string getCurrentSBML()
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                return (string)HighLevel.convertArray(oService.getMethod("string getCurrentSBML()").call(oArguments).getObject());
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Layouts the currently loaded SBML model and returns the model with Layout information
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static string getSBML()
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                return (string)HighLevel.convertArray(oService.getMethod("string getSBML()").call(oArguments).getObject());
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Generates a layout with the given settings of gravity, stiffness and magnetism.
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static string generateLayout(double var0, double var1, bool var2)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);
                oArguments.add(var1);
                oArguments.add(var2);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                return (string)HighLevel.convertArray(oService.getMethod("string generateLayout(double,double,boolean)").call(oArguments).getObject());
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Generates a layout with the given settings of gravity, stiffness, magnetism mode, boundary mode, grid mode.
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static string generateLayout2(double var0, double var1, bool var2, bool var3, bool var4)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);
                oArguments.add(var1);
                oArguments.add(var2);
                oArguments.add(var3);
                oArguments.add(var4);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                return (string)HighLevel.convertArray(oService.getMethod("string generateLayout(double,double,boolean,boolean,boolean)").call(oArguments).getObject());
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Reads in a file with SBML Layout and converts reactions to a more friendly format
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static string convertLayout(string var0)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                return (string)HighLevel.convertArray(oService.getMethod("string convertLayout(string)").call(oArguments).getObject());
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Loads an SBML file (level 1 or level 2) in order to generate a layout
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static void loadSBML(string var0)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                oService.getMethod("void loadSBML(string)").call(oArguments);
                return;
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

        ///<summary>
        ///Loads an SBML file (level 1 or level 2) in order to generate a layout
        ///</summary>
        [System.Diagnostics.DebuggerStepThrough(), System.Diagnostics.DebuggerHidden()]
        public static void doAnalysis(string var0)
        {
            try
            {
                DataBlockWriter oArguments = new DataBlockWriter();
                oArguments.add(var0);

                LowLevel.SBWConnect();
                Module oModule = new Module("DrawNetwork");
                Service oService = oModule.getService("network");
                oService.getMethod("void doAnalysis(string)").call(oArguments);
                return;
            }
            catch (SBWException e)
            {
                throw e;
            }
        }

    }
}
